import YiDialog from "./dialog/index.js"; // 弹框组件
import YiPublicSearch from "./PublicSearch/index.js"; // 高级检索
import YiTable from "./tabel/index.js"; // table 组件
import YiEchart from "./echart/index"; // echart 组件
import YiUpload from "./upload/index"; // 上传组件
import YiDownload from "./download/index"; // 下载组件
import YiMapPositioning from "./MapPositioning/index.js"; // 高德地图定位
const components = [
    YiDialog,
    YiPublicSearch,
    YiTable,
    YiEchart,
    YiUpload,
    YiDownload,
    YiMapPositioning
]

const install = (Vue) => {
    if (install.installed) return;
    components.forEach(component => {
        Vue.component(component.name, component);
    })
}

if (typeof window !== 'undefined' && window.Vue) {
    install(window.Vue);
}

export default {
    install,
    YiDialog,
    YiPublicSearch,
    YiTable,
    YiEchart,
    YiUpload,
    YiDownload,
    YiMapPositioning
}